<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!-- 搜索 Start -->
<table width="1002" height="38" border="0" align="center" cellpadding="0" cellspacing="0"  style="margin-bottom:5px;">
  <tr>
    <td background="${ctx}/images/lt_new/s_bg.gif">
      <table width="950" height="32" border="0" align="center" cellpadding="0" cellspacing="0">
       <tr>
        <td width="550" valign="middle">
          <span style="font-weight:bold; color:#CE0609; font-size:14px;">搜索：</span>
          <select id="query_type" name="query_type">
            <option value="book">&nbsp;图书&nbsp;</option>
            <option value="article">&nbsp;其他&nbsp;</option>
          </select>&nbsp;
          <input type="text" id="query_title" name="query_title" class="inputborder" style="width:250px;"/>
          &nbsp;&nbsp;
          <input type=button value="查询" onclick="query()" style="border:1px solid #C0C0C0; height:22px; width:50px; background-color:#CE0609; color:#FFF;" >
          &nbsp;&nbsp;&nbsp;&nbsp;
          <a href="${ctx}/search/adsearch.do"><img src="${ctx}/images/lt_new/zoom.gif"><b>高级搜索</b></a>
        </td>
        <td width="400" align="right">
	      <div style="width:400px; float: left; text-align: right; font-weight: bold;" >
	    	<a href="${ctx}/mainbook/index.do?bookType=1&currentPage=0" style="color: green;">新书</a>&nbsp;&nbsp;&nbsp;&nbsp;
	    	<a href="${ctx}/mainbook/index.do?bookType=2&currentPage=0" style="color: green;">热销</a>&nbsp;&nbsp;&nbsp;&nbsp;
	    	<a href="${ctx}/mainbook/index.do?bookType=3&currentPage=0" style="color: green;">特价</a>&nbsp;&nbsp;&nbsp;&nbsp;
	    	<a href="${ctx}/mainbook/index.do?gradeId=E1&currentPage=0" style="color: green;">小升初</a>&nbsp;&nbsp;&nbsp;&nbsp;
	    	<a href="${ctx}/mainbook/index.do?gradeId=E2&currentPage=0" style="color: green;">中考</a>&nbsp;&nbsp;&nbsp;&nbsp;
	    	<a href="${ctx}/mainbook/index.do?gradeId=E3&currentPage=0" style="color: green;">高考</a>&nbsp;&nbsp;&nbsp;&nbsp;
	      </div>
        </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<script type="text/javascript">
  function query(){
	  type = $("#query_type").val();
	  title = $("#query_title").val();
	  if (type == "book"){
		  $("#model_name").val($("#query_title").val());
		  $("#bookFrom").submit();
	  }else{
		  $("#model_shortTitle").val($("#query_title").val());
		  $("#articleFrom").submit();
	  }
  }
  
  /**
  var book_name = ''; //保留着两个属性
  var art_shortTitle = ''; //保留着两个属性
  alert(book_name + "," + art_shortTitle);
  */
</script>
<form id="bookFrom" action="${ctx}/search/index.do" style="margin: 0px;">
	<input type="hidden" id="model_name" name="model.name">
</form>

<form id="articleFrom" action="${ctx}/ltart/query.do" style="margin: 0px;">
	<input type="hidden" id="model_shortTitle" name="model.shortTitle">
</form>
<!-- 搜索 End -->